<?
include "../db_config.php";
include "Database.class.php";
include_once "snoopy/Snoopy.class.php";

$db = new Database($host_name, $user_name, $db_password, $db_name);
$db->connect();

$time = date('H:i:s');
$sql = "select * from trainInfo where startTime1 <= '$time' and endTime1 >=
'$time' and line = '2' and updown='1' ";
$rows = $db->fetch_all_array($sql);
$i = 0;
foreach($rows as $data)
{
	print_r($data);
	echo "<BR>";
	$i++;
}
echo $i;

$db->close();
?>
